<%--
  Created by IntelliJ IDEA.
  User: C
  Date: 2022/7/4
  Time: 10:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    String ip=request.getRemoteHost();
    request.setCharacterEncoding("utf-8");
    String loginname=request.getParameter("loginname");
    String upass = request.getParameter("upass");
    if(loginname.equals("abc")&&upass.equals("123")){
        session.setAttribute("USER_LOGIN",loginname);
        session.setAttribute("upass",upass);
        //request.getRequestDispatcher("welcome.jsp").forward(request,response);
        response.sendRedirect("welcome.jsp");
    }else {
        request.getRequestDispatcher("denglu.jsp").forward(request,response);
    }

%>
</body>
</html>
